package com.waimai1.waimai.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.waimai1.waimai.common.R;
import com.waimai1.waimai.dao.ChoujiangWhiteDao;
import com.waimai1.waimai.entity.ChoujiangWhite;
import com.waimai1.waimai.service.ChoujiangWhiteService;
import org.springframework.stereotype.Service;

/**
 * (ChoujiangWhite)表服务实现类
 *
 * @author makejava
 * @since 2023-12-22 10:59:47
 */
@Service("choujiangWhiteService")
public class ChoujiangWhiteServiceImpl extends ServiceImpl<ChoujiangWhiteDao, ChoujiangWhite> implements ChoujiangWhiteService {
    @Override
    public boolean inWhite(String phone){
        LambdaQueryWrapper<ChoujiangWhite> whiteLambdaQueryWrapper =new LambdaQueryWrapper<>();
        whiteLambdaQueryWrapper.eq(ChoujiangWhite::getPhone,phone);
        ChoujiangWhite white=this.getOne(whiteLambdaQueryWrapper,false);
        if(null==white){
            return false;
        }
        return true;
    }
}

